package com.racedepartment.model;

public class Function extends Model{

	private int function_sk;
	private String name;
	private String code;
	
	public static final String TABLE_NAME = "FUNCTION";
	
	public static final String FUNCTION_SK = "FUNCTION_SK";
	public static final String NAME = "NAME";
	public static final String CODE = "CODE";
	public static final String[] FIELDS = {FUNCTION_SK, NAME, CODE};
	public static final int[] DATATYPES = {DATATYPE_INT, DATATYPE_TEXT, DATATYPE_TEXT};

	/**
	 * @param function_sk
	 * @param name
	 * @param code
	 */
	public Function(int function_sk, String name, String code) {
		super();
		this.function_sk = function_sk;
		this.name = name;
		this.code = code;
	}

	/**
	 * @return the function_sk
	 */
	public int getFunction_sk() {
		return function_sk;
	}

	/**
	 * @param function_sk
	 *            the function_sk to set
	 */
	public void setFunction_sk(int function_sk) {
		this.function_sk = function_sk;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @param code
	 *            the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}

	@Override
	public String[] getValues() {
		String[] values = new String[3];
		values[0] = new Integer (getFunction_sk()).toString();
		values[1] = getName();
		values[2] = getCode();
		return values;
	}

	@Override
	public String[] getFields() {
		return FIELDS;
	}

	@Override
	public int[] getDataTypes() {
		return DATATYPES;
	}

}
